package org.jeecg.modules.kafka;

import lombok.extern.slf4j.Slf4j;
import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class KafkaConsumer {

//    @KafkaListener(topics = {"test"})
    @Async
    public void kafkaListener(ConsumerRecord<String, String> consumerRecord){
        log.info("开始监听kafka, consumerRecord: {}", consumerRecord);
    }

}
